#include "TcpSendTask.h"


void Call::TcpSendTask::Run()
{
    while (1)
    {
        std::this_thread::sleep_for(std::chrono::milliseconds(500));

        Call::StateBuffer buf;
        buf.no = 20;
        int len = m_tcpSocket.Send<Call::StateBuffer>(buf);
        
        
        LOGI("send len is %d", len);
        if (len < 0)
        {
            LOGI("%s %d disconnnected", this->m_tcpSocket.IP(), this->m_tcpSocket.Port());
            break;
        }
    }
}
